﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace wfaFoxMigrator
{     
    static class Program
    {        
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SetCurrentCulture();
            Application.Run(new frmMainFM());          
        }
        static void MainThreaded()
        {
           
        }
        public static void SetCurrentCulture()
        {          
            CultureInfo culture = new CultureInfo(Properties.Settings.Default.CurrentCulture);            
            culture.DateTimeFormat.ShortDatePattern = Properties.Settings.Default.DateFormat;
            String formatoHora = Properties.Settings.Default.TimeFormat;
            culture.DateTimeFormat.ShortTimePattern = formatoHora;
            culture.DateTimeFormat.LongTimePattern = formatoHora;
            culture.DateTimeFormat.LongDatePattern = Properties.Settings.Default.DateFormat + " " + formatoHora;
            culture.NumberFormat.NumberDecimalSeparator = Properties.Settings.Default.NumberDecimalSep;
            culture.NumberFormat.CurrencyDecimalSeparator = Properties.Settings.Default.CurrencyDecimalSep;
            culture.NumberFormat.NumberGroupSeparator = Properties.Settings.Default.NumberGroupSep;
            culture.NumberFormat.CurrencyGroupSeparator = Properties.Settings.Default.CurrencyGroupSep;
            culture.NumberFormat.CurrencySymbol = "$";
            Thread.CurrentThread.CurrentCulture = culture;
            Application.CurrentCulture = culture;
        }
    }
}
